package com.lantosec.hmrp.modules.notify.vo;

import com.lantosec.hmrp.modules.notify.entity.NotifyType;
import com.lantosec.hmrp.core.mvc.BaseVO;
import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
import lombok.AllArgsConstructor;
import lombok.Data;
import lombok.NoArgsConstructor;

import java.util.List;

/**
 * <p>
 * 通知分类 VO对象
 * </p>
 *
 * @author AutoCode
 * @since 2020-05-22
 */
@Data
@AllArgsConstructor
@NoArgsConstructor
@ApiModel(value="NotifyType对象", description="通知分类")
public class NotifyTypeVO extends BaseVO<NotifyType> {
    private static final long serialVersionUID = 1L;


    public NotifyTypeVO(NotifyType entity){
        this.notifyTypeId = entity.getNotifyTypeId();
        this.notifyType = entity.getNotifyType();
        this.parentId = entity.getParentId();
    }

    @Override
    public NotifyType convertToEntity(){
        return new NotifyType(this);
    }


    @ApiModelProperty(value = "通知类型ID")
    private String notifyTypeId;

    @ApiModelProperty(value = "通知类型")
    private String notifyType;

    @ApiModelProperty(value = "上级ID")
    private String parentId;

    @ApiModelProperty(value = "通知信息列表")
    private List<NotifyInfoVO> notifyInfoVOList;
}
